﻿using System;
using System.Collections.Generic;
using System.Text;

namespace TcpTestServer.BusinessLogic
{
    public class RsdStateMachine
    {
        private List<IRobotTask> robotTasks = new List<IRobotTask>();

        public RsdStateMachine()
        {
            AddRobotSleepTask(500);
            AddRobotSleepTask(300);
            AddRobotSleepTask(200);
        }

        public void AddRobotMotionTask()
        {
            throw new System.NotImplementedException();
        }
        public void AddRobotStandardTask()
        {
            throw new System.NotImplementedException();
        }
        public void AddRobotSleepTask(int sleepTime)
        {
            robotTasks.Add(new sleepTask(sleepTime));
        }

        public void executeAllTasks()
        {
            throw new System.NotImplementedException();
        }

        public void executeNextTask()
        {
            throw new System.NotImplementedException();
        }

        public void clearAllTasks()
        {
            robotTasks.Clear();
        }

        private void processReply()
        {

        }

        public List<String> getPendingTasks()
        {
            List<String> taskNames = new List<string>();
            foreach (IRobotTask task in robotTasks)
            {
                taskNames.Add(task.ToString());
            }
            return taskNames;
        }

    }
}
